//
//  StreetDetailInfoViewController.m
//  homeland
//
//  Created by SunShine on 13-10-23.
//  Copyright (c) 2013年 xzysun. All rights reserved.
//

#import "StreetDetailInfoViewController.h"
#import "StreetInfoService.h"

@interface StreetDetailInfoViewController ()

@end

@implementation StreetDetailInfoViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.title = @"街道简介";
    self.detailInfoTextView.text = [StreetInfoService getService].selectedStreetDescription;
    self.btnPhone.titleLabel.text=[StreetInfoService getService].streetDetailInfo.phone;
    self.labelAddress.text=[StreetInfoService getService].streetDetailInfo.address;
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(IBAction)callPhone:(id)sender
{
    NSString* numberAfterClear =self.btnPhone.titleLabel.text;
    NSURL *phoneNumberURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", numberAfterClear]];
    NSLog(@"make call, URL=%@", phoneNumberURL);
    [[UIApplication sharedApplication] openURL:phoneNumberURL];
}
@end
